package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.cn.jx.common.entity.BaseEntity;
import com.jx.enumType.YesNoEnum;

/**
 * <p>Contact 联系人POJO类 对应数据库表名 SYS_CONTACT
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseEntity <tt>BaseEntity</tt>}
 * 
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_CONTACT")
public class Contact extends BaseEntity {

	private static final long serialVersionUID = -8750145051228122840L;
	
	/** <p>手机 <p>设置为{@link String String}类型*/
	@Column(name="mobile",length=32,unique=true,nullable=false)
	private String mobile;
	
	@Column(name="mobile_refer",length=32)
	private String mobileRefer;
	
	/** <p>固话 <p>设置为{@link String String}类型*/
	@Column(name="telphone",length=32)
	private String telphone;
	
	@Column(name="telphone_refer",length=32)
	private String telphoneRefer;
	
	/** <p>email<p>设置为{@link String String}类型*/
	@Column(name="email",length=64,unique=true,nullable=false)
	private String email;
	
	/** <p>qq<p>设置为{@link String String}类型*/
	@Column(name="qqNum",length=32,unique=true)
	private String qqNum;
	
	/** <p>微信<p>设置为{@link String String}类型*/
	@Column(name="wechat",length=64,unique=true)
	private String wechat;
	
	/** <p>国家码<p>设置为{@link String String}类型*/
	@Column(name="countrycode",length=32)
	private String countryCode;
	
	/** <p>区号<p>设置为{@link String String}类型*/
	@Column(name="areacode",length=32)
	private String areaCode;
	
	/**
	 * 初始化创建类
	 * @return
	 */
	public static Contact getInstance(String operUser){
		Date day=new Date();
		Contact m=new Contact();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setCreateTime(day);
		m.setOperatTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}
	
	public String getMobileRefer() {
		return mobileRefer;
	}
	public void setMobileRefer(String mobileRefer) {
		this.mobileRefer = mobileRefer;
	}
	public String getTelphoneRefer() {
		return telphoneRefer;
	}


	public void setTelphoneRefer(String telphoneRefer) {
		this.telphoneRefer = telphoneRefer;
	}


	/** <p>{@link String String}<p>getMobile()*/
	public String getMobile() {
		return mobile;
	}
	/** <p>{@link String String}<p>getTelphone()*/
	public String getTelphone() {
		return telphone;
	}
	/** <p>{@link String String}<p>getEmail()*/
	public String getEmail() {
		return email;
	}
	/** <p>{@link String String}<p>getQqNum()*/
	public String getQqNum() {
		return qqNum;
	}
	/** <p>{@link String String}<p>getWechat()*/
	public String getWechat() {
		return wechat;
	}
	/** <p>{@link String String}<p>getCountryCode()*/
	public String getCountryCode() {
		return countryCode;
	}
	/** <p>{@link String String}<p>getAreaCode()*/
	public String getAreaCode() {
		return areaCode;
	}
	
	/** <p>setMobile({@link String mobile})*/
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/** <p>setTelphone({@link String telphone})*/
	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}
	/** <p>setEmail({@link String email})*/
	public void setEmail(String email) {
		this.email = email;
	}
	/** <p>setQqNum({@link String qqNum})*/
	public void setQqNum(String qqNum) {
		this.qqNum = qqNum;
	}
	/** <p>setWechat({@link String wechat})*/
	public void setWechat(String wechat) {
		this.wechat = wechat;
	}
	/** <p>setCountryCode({@link String countryCode})*/
	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}
	/** <p>setAreaCode({@link String areaCode})*/
	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
}
